package Views;

import javafx.fxml.FXML;
import javafx.scene.control.Label;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;

import Controllers.MainApp;
import Models.Device;

public class MonitorInfoWinController 
{
	
	@FXML
	private void handleReportSignalState_No0001()
	{
		String index = "0001";
		String state = "NORMAL";
		
		Device device = new Device();
		device.insertSisgnalStatetoDb(index, state);
	}
	
	@FXML
	private void handleReportSignalState_No0002()
	{
		String index = "0002";
		String state = "WARNING";
		
		Device device = new Device();
		device.insertSisgnalStatetoDb(index, state);
	}
	
	@FXML
	private void handleReportSignalState_No0003()
	{
		String index = "0003";
		String state = "ERROR";
		
		Device device = new Device();
		device.insertSisgnalStatetoDb(index, state);
	}
	
	@FXML
	private void handleReportSignalState_No0004()
	{
		String index = "0004";
		String state = "OFFLINE";
		
		Device device = new Device();
		device.insertSisgnalStatetoDb(index, state);
	}
	
	@FXML
	private void handleReportSignalState_No0005()
	{
		String index = "0005";
		String state = "NORMAL";
		
		Device device = new Device();
		device.insertSisgnalStatetoDb(index, state);
	}
	
	@FXML
	private void handleClearDb()
	{
		Device device = new Device();
		device.ClearDb();
	}
	
	@FXML
	private void handleRootUserLogin()
	{
		String name = "Jack";
		String level = "Root";
		
		Device device = new Device();
		device.insertUserToDb(name, level);
	}
	
	@FXML
	private void handleNormalUserLogin()
	{
		String name = "Bill";
		String level = "Normal";
		
		Device device = new Device();
		device.insertUserToDb(name, level);
	}
}
